-- GENERATED SPELL FOR [Captain Qeez] --


function spell0_15391(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15391', 614, 1)
end

function spell1_15391(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(19134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15391', 6280, 1)
end

function spell2_15391(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(24317,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15391', 20326, 1)
end

function Sorts_15391(pUnit, Event)
local choix_sorts_15391 = math.random(0, 2)
if choix_sorts_15391 == 0 then
pUnit:RegisterEvent('spell0_15391', 1, 1)
end
if choix_sorts_15391 == 1 then
pUnit:RegisterEvent('spell1_15391', 1, 1)
end
if choix_sorts_15391 == 2 then
pUnit:RegisterEvent('spell2_15391', 1, 1)
end
end

function mob15391_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15391', math.random(1500, 3000), 1)
end

function mob15391_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15391_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15391_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15391, 1, 'mob15391_Action')
RegisterUnitEvent(15391, 2, 'mob15391_Leave')
RegisterUnitEvent(15391, 3, 'mob15391_Kill')
RegisterUnitEvent(15391, 4, 'mob15391_Die')
